---@class Table_UIPathItem
local Table_UIPathItem = class("Table_UIPathItem");

function Table_UIPathItem:ctor()
    self.Id = 0;    --唯一ID
    self.Path = "";    --资源路径
    self.UIType = 0;    --界面类型
    self.PanelNum = 0;    --界面Panel数量
    self.ReId = 0;    --返回界面ID
    self.Destroy = false;    --关闭时是否销毁
    self.DestroyUnload = false;    --切换场景时是否销毁
    self.IsBackClose = false;    --是否可以通过导航栏返回按钮关闭界面 
    self.CameraMovieId = 0;    --镜头动画ID
    self.Layer = 0;    --界面层级
    self.IsShowBg = 0;    --背景开关
    self.SceneBgName = "";    --背景图片名称
    self.LockType = 0;    --锁屏遮罩类型
    self.Show3D = 0;    --是否显示3D相机
    self.OpenGuideId = 0;    --功能开启新手指引ID
    self.ErrorId = 0;    --错误码ID
    self.FuncSwitchId = 0;    --功能开关ID
    self.IsPlayTween = false;    --是否播放动画
    self.IsFuzz = 0;    --是否需要背景模糊
    self.ScriptCtrl = "";    --Ctrl脚本路径
    self.LuaObjId = 0;    --view脚本ID
end

function Table_UIPathItem:Load(reader)
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.Id = tonumber(self.temp); end
    self.Path = reader:ReadString();
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.UIType = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.PanelNum = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.ReId = tonumber(self.temp); end
    self.Destroy = reader:ReadBool();
    self.DestroyUnload = reader:ReadBool();
    self.IsBackClose = reader:ReadBool();
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.CameraMovieId = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.Layer = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.IsShowBg = tonumber(self.temp); end
    self.SceneBgName = reader:ReadString();
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.LockType = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.Show3D = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.OpenGuideId = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.ErrorId = tonumber(self.temp); end
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.FuncSwitchId = tonumber(self.temp); end
    self.IsPlayTween = reader:ReadBool();
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.IsFuzz = tonumber(self.temp); end
    self.ScriptCtrl = reader:ReadString();
    self.temp = reader:ReadShortString();
    if not Utility.IsNullOrEmpty(self.temp) then self.LuaObjId = tonumber(self.temp); end
    self.temp = nil;
end

---@class Table_UIPathMgr : IDataMgr
local Table_UIPathMgr = class("Table_UIPathMgr", IDataMgr);

function Table_UIPathMgr:FileName()
    return "Txt/UIPath.txt";
end

---@return Table_UIPathItem
function Table_UIPathMgr:GetItemById(id)
    return self.super:GetItemById(id)
end

---@return Table_UIPathItem
function Table_UIPathMgr:GetItemByIdx(idx)
    return self.super:GetItemByIdx(idx)
end

function Table_UIPathMgr:Load(reader)
    local item = Table_UIPathItem.new();
    item:Load(reader);
    self.mItemDic[item.Id] = self.mDataCount;
    table.insert(self.mItemList, item);
end

return Table_UIPathMgr;